package com.guochenglang.www.pojo;

import com.guochenglang.www.pojo.annotate.Table;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author 郭程朗
 */
@Table("comment")
public class Comment {
    private Integer id;
    private String comment;
    private Integer commentId;
    private Timestamp commentTime;
    private Integer articleId;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Comment comment1 = (Comment) o;
        return Objects.equals(id, comment1.id) && Objects.equals(comment, comment1.comment) && Objects.equals(commentId, comment1.commentId) && Objects.equals(commentTime, comment1.commentTime) && Objects.equals(articleId, comment1.articleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, comment, commentId, commentTime, articleId);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Timestamp getCommentTime() {
        return commentTime;
    }

    public void setCommentTime(Timestamp commentTime) {
        this.commentTime = commentTime;
    }

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Comment(Integer id, Integer articleId, Timestamp commentTime, Integer commentId, String comment) {
        this.id = id;
        this.articleId = articleId;
        this.commentTime = commentTime;
        this.commentId = commentId;
        this.comment = comment;
    }

    public Comment() {
    }
}
